<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.zpyr.mvc.vo.Carc_evaluation"%>
<%@page import="java.util.List"%>
<%@page import="com.zpyr.mvc.vo.Carc_info"%>
<%@page import="com.zpyr.common.StringUtil"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" context="width=device-width , height=device-width , user_scalable=no" />
<%
%>
<title></title>
<script>
	
	$(document).ready(function(){
		var favList = new StorageMapArrayList('carcenter');

		var keyArray = favList.getStorageKeyArray();
		var valArray = favList.getStorageValArray();
		
		var div = $('#favs_list');
		var elem , remspan , keyspan;
		for( var i = 0 ; i < keyArray.length ; i++ ) {
			remspan = $('<span>').css('float' , 'right').text('삭제').addClass('button1').attr('info_seq' , keyArray[i]);
			keyspan = $('<span>').text( valArray[i] );
			elem = $('<li style="height:30px; vertical-align:center;">').append( keyspan ).append(remspan).append($('<br />')).append($('<br />')).append($('<hr />'));
			elem.attr('info_seq' , keyArray[i]);
			elem.click(function(){
				var key = $(this).attr('info_seq');
				goCarcenterInfoPage( key );
			});
			
			remspan.click(function(e){
				if(confirm('정말 삭제하시겠습니까?')) {
					var key = $(this).attr('info_seq');
					favList.remove(key);
					favList.setStorage();
					elem.fadeOut();
				}
				e.stopPropagation();
			});
			
			div.append( elem );
		}
	});

</script>
<style>

</style>
</head>
<body>

<div id="header" class="header">
<span style="">즐겨찾기</span>
</div>

<div id="main">
	<div class="content1">
		<h3>즐겨찾기 리스트</h3>
		<br />
		<ul id="favs_list">
		</ul>
	</div>
</div>
</body>
</html>